package com.houtai.common.util;


import com.houtai.bean.TsJzAdmin;
import com.houtai.bean.TsJzAdminOperation;
import com.houtai.dao.TsJzAdminOperationDao;
import org.springframework.data.redis.core.RedisTemplate;

import javax.servlet.http.HttpServletRequest;

/**
 * 日志工具类
 *
 */
public class LogUtils {


    public static void AdminOperation(RedisTemplate redisTemplate , TsJzAdminOperationDao tsJzAdminOperationDao , String str , HttpServletRequest request){
        TsJzAdminOperation tsJzAdminOperation = new TsJzAdminOperation();
        TsJzAdmin tsJzAdmin = (TsJzAdmin) redisTemplate.opsForValue().get(request.getParameter("token")) ;
        tsJzAdminOperation.setAdmin_name(tsJzAdmin.getUser_name());
        tsJzAdminOperation.setAdmin_operation(tsJzAdmin.getUser_name() + str);
        tsJzAdminOperationDao.insert(tsJzAdminOperation);
    }

}